package com.kc.business.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 商品规格
 */
@Data
@Table(name = "kc_goods_sku")
@NoArgsConstructor
@AllArgsConstructor
public class BizGoodsSku {
    /*主键id*/
    @Id
    private Integer id;
    /*商品id*/
    @NotNull(message = "商品ID错误")
    @Min(value = 1,message = "商品id错误")
    private Integer goodsId;
    /*商品规格名称*/
    @NotBlank(message = "商品规则名称错误")
    private String skuName;
    /*商品规格价格*/
    @NotNull(message = "商品规格价格错误")
    @Min(value = 0,message = "商品规格价格错误")
    private BigDecimal price;
    /*商品规格活动价格*/
    private BigDecimal activityPrice;
    /*状态:1上架，0下架*/
    private Integer status;
    /*删除标识:1已删除，0未删除*/
    private Integer isDeleted = 0;
    /*图片地址*/
    @NotBlank(message = "图片地址不能为空")
    private String image;
    /*库存数量*/
    @NotNull(message = "库存数量不能为空")
    @Min(value = 1,message = "库存数量错误")
    private Integer total;
    /*销量*/
    private Integer salesreal;



}
